<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
    <head>
   <meta charset="UTF-8">
   <%@ include file="/WEB-INF/views/include/head.jsp"%> 
   <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
   <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
   <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
   <script src="${ctxStatic}/js/layer.js"></script>
   <script src="${ctxStatic}/js/style.js"></script>
            <script type="text/javascript">
                $(document).ready(function(){
                	 $(".showHtml").find("input,select").attr("disabled","disabled");
            		 var form = $("#inputForm");  
            	        form.validate();//验证指定的表单
            	        	
            	        	$("#okButton").click(function(){
            	        		if (form.valid()) {//如果表单验证成功，则进行提交。  
            	        		$("#showHtml").addClass("showHtml");
            	                $("#okHead").show();
            	                $("#createHead").hide();
            	                $("#operateP").hide();
            	                $('tr').find('td:eq(0)').hide();
            	                $("tr").children('th').eq(0).hide();	
            	            
            	                return false;
            	              }
            	         });
                
                });
                //删除项目
                function delSize(){
                    // 调用后台删除方法
                    $.post("${ctx}/fabric/consumption/delete?sizeUnitCostId=${consumption.sizeUnitCostId}",'',function(result){
                        // 提示信息
                        tipParent(result.message);
                        // 返回结果

                        if(result.statusCode==STATUSCODEOK){
                            // 刷新页面
                            window.parent.frames[0].location.reload();
                            closeWin(); 
                         }
                    },'json');
               }
            </script>
    </head>
    <body style="width: 800px">
        <form id="inputForm" name="inputForm">
        <!--头部-->
        <div class="layerHeader clearfix">
            <!-- 查看面料单耗 -->
            <p class="headerTitle"><spring:message code="size_showSizeCost"/></p>
            <div class="headerButton clearfix">
                <shiro:hasPermission name="fabric:consumption:edit">
                <!-- 编辑 -->                
                 <button type="button" onClick="window.location.href='${ctx}/fabric/consumption/form?sizeUnitCostId=${consumption.sizeUnitCostId}'" >
	               <spring:message code="production_process_edit" />
	        	 </button>  
                <!-- 删除 -->
                <button type="button" onclick="del(delSize)"><spring:message code="role_delete"/></button>
                </shiro:hasPermission>
                <!-- 关闭 -->
                <button type="button" onclick="closeWin()"><spring:message code="purchaseContract_edit_cancle"/></button>
            </div>
        </div>
        <div id="showHtml" class="tabBoxSm">   
        <div class="tabSm smOrderBox">
        <div class="clearfix">
            <div class="">  
                <div class="col-50 items clearfix haveToBox">
                    <!-- 款式类别： -->
                    <p class="tit"><spring:message code="size_styleCategory_show"/></p>
                    <p>${fns:getDictName(consumption.styleCategoryCd)}</p>                    
                </div>
                <div class="col-50 items clearfix haveToBox">
                    <!-- 尺码组： -->
                    <p class="tit"><spring:message code="size_sizeGroup_show"/></p>
                    <p>${fns:getDictName(consumption.styleSizeGroupCd)}</p>
                </div>
            </div>
            <div class=""> 
             	 <div class="col-50 items clearfix haveToBox">
                    <!-- 尺码： -->
                    <p class="tit"><spring:message code="size_size_show"/></p>
                    <p>${consumption.styleSizeCd}</p>
                </div>
                <div class="col-50 items clearfix haveToBox">
                    <!-- 版型： -->
                    <p class="tit"><spring:message code="size_styleFit_show"/></p>
                    <p>${fns:getDictName(consumption.fitCd)}</p>
                </div>                
            </div>
            <div class="">                  
                <div class="col-50 items clearfix haveToBox">
                    <!-- 状态： -->
                     <p class="tit"><spring:message code="size_state_show"/></p>
       				 <p>
         				<c:if test="${consumption.enableFlag eq 1}"><spring:message code="dict_enable"/></c:if>
         				<c:if test="${consumption.enableFlag eq 0}"><spring:message code="dict_disable"/></c:if>
        			 </p>
                </div>
                <div class="col-50 items clearfix haveToBox">
                     <!--备注-->
                        <p class="tit"><spring:message code="size_remarks_show"/></p>
                        <p>${consumption.remarks}</p>                        
                </div>
            </div>
            <div class="">
                <div class="col-50 items clearfix haveToBox">
                    <!-- 单耗-->
                    <p class="tit"><spring:message code="size_Cost_show"/></p>
                    <p>${consumption.sizeUnitCost}</p>
                </div>
            </div>
        </div> 
<%--         <div class="tabSm smOrderBox" id="itemSub">
  <div class="tableArea"> 
  <div class="tableScroll tableScrollSm" style="padding-top: 0px;margin-left: 50px">
	<div style = "overflow: auto; position: relative;background-color:#ddd;">      
        <table cellpadding="0" class="" style="border: none">		                    
		    <tr>
				<!-- 设计项目 -->
                <th><p class="width-150px"><spring:message code="size_xiangmu" /></p></th>
                <!-- 项目值 -->
                <th><p class="width-150px"><spring:message code="production_process_instructions" /></p></th> 
                <!-- 单耗-->
                <th><p class="width-150px"><spring:message code="size_Cost" /></p></th>
		    </tr>		                    
		</table>	
	</div>
	<div style = "overflow: auto; position: relative;background-color:#fff;border:1px solid #B7B9B8;height:200px;">
        <table cellpadding="0" class="" id="perantTable" name="perantTable">       
            <c:forEach items="${consumption.consumptionList}" var="consumptionInfo" varStatus="status">
            <tbody>            
            <tr>            	
                <!-- 设计项目 -->
                <td><p class="width-150px">${consumptionInfo.consumptionCD}</p></td>
                <!-- 项目值 -->
                <td><p class="width-150px">${consumptionInfo.consumptionValue}</p></td>
                <!-- 单耗-->
                <td><p class="width-150px">${consumptionInfo.sizeUnitCost}</p></td>
            </tr>
            </tbody>
            </c:forEach>                
        </table>
		<div id="hiddenHtml"></div>
   </div>
</div>
</div>
</div>--%>
</div>
</form>      
</body>
</html>